package skyinline.swing;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;

public class SwingMenuActionListener implements ActionListener {

	@Override
	public void actionPerformed(ActionEvent e) {

		switch (e.getActionCommand()) {
		case "new" :
			JOptionPane.showMessageDialog(null, "New 메뉴가 클릭됨", "New 메뉴", JOptionPane.QUESTION_MESSAGE);
			break;
		case "close" :
			JOptionPane.showMessageDialog(null, "Close 메뉴가 클릭됨", "Close 메뉴", JOptionPane.WARNING_MESSAGE);
			break;
		case "about" : new SwingAboutDialog();
			
			break;
		case "exit" :
			System.exit(0);
			break;
		}
	}

}
